package service;

import dao.ColumnDao;
import entity.Column;

import java.util.List;

public class ColumnService {
    private final ColumnDao columnDao = new ColumnDao();

    public List<Column> searchColumnsByKeyword(String keyword) {
        return columnDao.searchColumnsByKeyword(keyword);
    }

    public List<Column> getColumnsByUserId(int userId){
        return columnDao.getColumnsByUserId(userId);
    }

    public void createColumn(String name, int userId){
        columnDao.createColumn(name,userId);
    }

    public boolean addBlogToColumn(int blogId, int columnId){
        return columnDao.addBlogToColumn(blogId, columnId);
    }

    public boolean removeBlogFromColumn(int blogId){
        return columnDao.removeBlogFromColumn(blogId);
    }

    public boolean deleteColumn(int columnId){
        return columnDao.deleteColumn(columnId);
    }
}
